$val =
wave.loudness ("<Wave Filename>",[Block Size],"[Freqstoignore]")
Gives the maximum frequency of the wave within the given block size.
The wave file is processed in block size portions and the maximum loudness obtained is taken.
Parameters
<Wave Filename>
Specify the name of wave file.
<Block Size>
Specify the size of the block. If block size is not given, 1000 is assumed i.e. (1 second)
<Freqstoignore>
Mention the frequency of the block that has to be ignored. Multiple frequencies can be specified here.
Return Value
On success it returns the maximum frequency, otherwise returns 0.
Remark
If freqstoignore parameter is not given, then the complete data is taken for loudness check.
Example
-
$val = wave.loudness("welcome.wav",1000)
msgbox($val)
- Displays the maximum frequency within the block size. None of the frequencies are ignored.
- $val contains the maximum frequency.
-
$val = wave.loudness("welcome.wav","100,2200")
msgbox($val)
- Displays the maximum frequency within the block size. It ignores blocks containing frequencies 100 and 2200 while checking for loudness.
- $val contains the maximum frequency.